3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Figure 14 shows a NURB curve.
Uns32 order
Uns32 nPoints
RationalPoint4D points[nPoints]
Float32 knots[order + nPoints]
A nonuniform rational B-spline (NURB) curve is a three-dimensional projection of a four-dimensional curve. A NURB curve is specified by its order, the number of control points used to define it, the control points themselves, and the knots used to define it. Attributes may be applied only to the entire NURB curve.
NURBCurve (
4 # order
7 # nPoints
0 0 0 1 # points
1 1 0 1
2 0 0 1
3 1 0 1
4 0 0 1
5 1 0 1
6 0 0 1
0 0 0 0 0.25 0.5 0.75 1 1 1 1 # knots
)
Previous | QD3D Book | Overview | Chapter Contents | Next |